/**
 * 物业公司数据操作
 */

var AV = require('leanengine')
var lean = require('../../../base/lean.js')

// 模糊查询物业名称
exports.property_search = function(propertyName,callback) {
    var cqlString = "select * from Property where p_name like '%" + propertyName + "%'";
    lean.cql(cqlString,function(data){
        callback(data.results)
    });
}

// 查询社区所在物业公司
exports.property_communityIn = function(propertyId,callback) {
    const cqlString = "select * from Property where objectId = '" + propertyId + "'"
    lean.cql(cqlString,function(data){
        var result = data.results
        callback(result)
    })
}
